/** \file    neighbor.h
  * \brief   relative cordinates of neighbors of a point
  * \date    2002
  * \author  Fedor Chelnokov
  * \version $Header: /home/cscom1r4/cvsroot/cs/include/imglib/neighbor.h,v 1.1 2004/02/04 14:43:24 cscom1r4 Exp $
  */

#ifndef _neighbor_h_
#define _neighbor_h_

#include "typelib/types.h"

namespace img {

static point<int> neighbor8[8] = {
	point<int>(0, -1),
	point<int>(-1, 0),
	point<int>(-1, -1),
	point<int>(1, -1),

	point<int>(1, 0),
	point<int>(1, 1),
	point<int>(0, 1),
	point<int>(-1, 1)
};

const size_t half_8nei = 4; //processed neighbours during cycles by y,x
const size_t full_8nei = 8;

static point<int> neighbor4[8] = {
	point<int>(0, -1),
	point<int>(-1, 0),

	point<int>(1, 0),
	point<int>(0, 1)
};

const size_t half_4nei = 2; //processed neighbours during cycles by y,x
const size_t full_4nei = 4;

} //namespace img

#endif //_neighbor_h_
